/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hd2tecnologia.auth;

/**
 *
 * @author PC
 */
public class Auth {

    private static Auth instance;
    private boolean auth = false;
    private String login;
    private int nivel;

    
    public void autenticar(String login, int nivel, String nome) {

        this.auth = true;
        this.login = nome;
        this.nivel = nivel;
        this.login = login;

    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public int getNivel() {
        return nivel;
    }

    public void setNivel(int nivel) {
        this.nivel = nivel;
    }

    public boolean isAuth() {
        return auth;
    }

    public void setAuth(boolean auth) {
        this.auth = auth;
    }
    
    
    public static Auth getInstance() {
        if (instance == null) {
            instance = new Auth();
        }
        return instance;
    }

    public static void killInstance() {
        instance = null;
    }
}
